
/**
 * Copyright 2009 cestum.org
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
package org.waveprotocol.wave.model.document.operation.impl {
import org.waveprotocol.wave.model.document.operation.AnnotationBoundaryMap;
import org.waveprotocol.wave.model.document.operation.Attributes;
import org.waveprotocol.wave.model.document.operation.AttributesUpdate;
import org.waveprotocol.wave.model.document.operation.BufferedDocInitialization;
import org.waveprotocol.wave.model.document.operation.DocInitializationComponentType;
import org.waveprotocol.wave.model.document.operation.DocInitializationCursor;
import org.waveprotocol.wave.model.document.operation.DocOpComponentType;  
import org.waveprotocol.wave.model.document.operation.util.DocOpComponentConstants;
import org.waveprotocol.wave.model.document.operation.DocumentOperationCursor;

/**
 * An abstract BufferedDocInitialization
 */
public class AbstractBufferedDocInitialization
	extends AbstractDocInitialization implements BufferedDocInitialization {
	
	
	override public function apply(c:DocumentOperationCursor):void {
		applyDocInit(DocInitializationCursor(c));
	}
	
	override public function applyDocInit(c:DocInitializationCursor):void {
		
	}
	
	public function toString():String {
		return DocumentOperationUtil.toConciseString(this);
	}
	
	
	public final function getRetainItemCount(i:int):int {
		throw new Error("Initializations have no retain components");
	}
	
	
	public final function getDeleteCharactersString(i:int):String {
		throw new Error(
			"Initializations have no delete characters components");
	}
	
	
	public function getDeleteElementStartTag(i:int):String {
		throw new Error(
			"Initializations have no delete element start components");
	}
	
	
	public function getDeleteElementStartAttributes(i:int):Attributes {
		throw new Error(
			"Initializations have no delete element start components");
	}
	
	
	public function getReplaceAttributesOldAttributes(i:int):Attributes {
		throw new Error(
			"Initializations have no replace attributes components");
	}
	
	
	public function getReplaceAttributesNewAttributes(i:int):Attributes {
		throw new Error(
			"Initializations have no replace attributes components");
	}
	
	
	public function getUpdateAttributesUpdate(i:int):AttributesUpdate {
		throw new Error(
			"Initializations have no update attributes components");
	}
	
	public function applyComponentDocInit(i:int, c:DocInitializationCursor):void {} ;
	public function getTypeInit(i:int):DocInitializationComponentType { return null;};
	public function size():int {return 0;};
	public function getType(i:int):DocOpComponentType {return null;};
	public function applyComponent(i:int, c:DocumentOperationCursor):void {};
	public function getAnnotationBoundary(i:int):AnnotationBoundaryMap {return null;};
	public function getCharactersString(i:int):String {return null;};
	public function getElementStartTag(i:int):String {return null;};
	public function getElementStartAttributes(i:int):Attributes {return null;};
	
}
}